
<html>
  <head>
<title>Unescape Encoder/Decoder</title>
<style type="text/css">
.input-text,.text-input, .select-box{
	margin:0 2px;
	padding:4px 6px;
	border: 1px solid #F9780E;

	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	font-family: gergia;
	font-style: italic;

	-webkit-box-shadow: 1px 1px 1px #dfdfdf;
	-moz-box-shadow: 1px 1px 1px #dfdfdf;
	box-shadow: 1px 1px 1px #dfdfdf;
	font-size: 14px;
	color: #666;
	max-width:auto;
}

.textarea-box, .textareaBox{
	border:1px solid #F9780E;
	padding:6px;
	-webkit-resize: none;
	-moz-resize: none;
	resize: none;
	-webkit-box-shadow: 1px 1px 1px #dfdfdf;
	-moz-box-shadow: 1px 1px 1px #dfdfdf;
	box-shadow: 1px 1px 1px #dfdfdf;
	
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
}
.textareaBox{
	display:block;
	width:90%;
	padding:10px;
	max-width:98%;
	margin:20px auto;
	max-height:600px;
	min-height:300px;
}
body { font-family: Verdana, Arial;margin: 0;padding: 0;text-align: left;background-color:#ffffff;font-size:14px;}
#outer-wrapper {font-family: Verdana, Arial;}
#content-wrapper { width: 98%; max-widtd:980px;  margin: 0 auto;  padding: 5px;  text-align: left;  background-color: #F9EAD4;
border:2px solid #F9780E;
-webkit-border-radius: 20px;-moz-border-radius: 20px;border-radius: 20px;
}
#content-wrapper h2 {text-align:center;font-size:20px;margin: 5px 0 1em 
;padding: 3px 10px;background-color: #F9780E;font-size:16px;color:#000;border:1px solid #111;
-webkit-border-radius: 20px;-moz-border-radius: 20px;border-radius: 20px;
}
.redi{-moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
</style>
<script language="javascript">
      var encN=1;

      function decodeTxt(s){
      var s1=unescape(s.substr(0,s.length-1));
      var t='';
      for(i=0;i<s1.length;i++)t+=String.fromCharCode(s1.charCodeAt(i)-s.substr(s.length-1,1));
      return unescape(t);
      }

      function encodeTxt(s){
      s=escape(s);
      var ta=new Array();
      for(i=0;i<s.length;i++)ta[i]=s.charCodeAt(i)+encN;
      return ""+escape(eval("String.fromCharCode("+ta+")"))+encN;
      }

      function escapeTxt(os){
      var ns='';
      var t;
      var chr='';
      var cc='';
      var tn='';
      for(i=0;i<256;i++){
      tn=i.toString(16);
      if(tn.length<2)tn="0"+tn;
      cc+=tn;
      chr+=unescape('%'+tn);
      }
      cc=cc.toUpperCase();
      os.replace(String.fromCharCode(13)+'',"%13");
      for(q=0;q<os.length;q++){
      t=os.substr(q,1);
      for(i=0;i<chr.length;i++){
      if(t==chr.substr(i,1)){
      t=t.replace(chr.substr(i,1),"%"+cc.substr(i*2,2));
      i=chr.length;
      }}
      ns+=t;
      }
      return ns;
      }
      function unescapeTxt(s){
      return unescape(s);
      }
      function wF(s){
      document.write(decodeTxt(s));
      }
</script>
</head>
<body>
<div id='content-wrapper'>
<h2>Unescape Encoder/Decode Tool by Muhammad Akbar</h2>
<table width="100%">
<br>
<center>
<form name="fA">
<br>
<fieldset class='redi' style='border:1px solid #7F9DB9;'><legend class='redi' align='left' style=' border:1px solid #7F9DB9;padding:3px 10px;margin-left:20px;'><b>Decoded</b></legend>
<textarea class="textarea-box" id="f1" cols=50 rows=10 wrap="off"></textarea></fieldset>
<br><br>
<input style='font-size:16px;width:200px;line-height:25px;font-weight:bold;' type="button" width="50%" value="Encode" onclick="document.fA.c1.value=escapeTxt(document.fA.f1.value)"> &nbsp; &nbsp;
<input style='font-size:16px;width:200px;line-height:25px;font-weight:bold;' type="button" value="Decode" onclick="document.fA.f1.value=unescapeTxt(document.fA.c1.value)">
<br>
<br><fieldset class='redi' style='border:1px solid #7F9DB9;'><legend class='redi' align='left' style=' border:1px solid #7F9DB9;padding:3px 10px;margin-left:20px;'><b>Encoded</b></legend>
<textarea class="textarea-box" id="c1" cols=50 rows=10></textarea></fieldset>
<br><br>
</form></center>
<center><small> Copyright &copy; 2012 All Rights Reserved by Muhammad Akbar @ <a href='http://www.muhammadakbar1.blogspot.com/'>Muhammad Akbar</a></small></center>
</div>
</body>
</html>